home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-12-31 | 43.0 KB | 1,153 lines | [TEXT/R*ch] |
- C.S.M.P. Digest Thu, 23 Jul 92 Volume 1 : Issue 148
-
- Today's Topics:
-
- THINK Pascal and debugging Time Manager Calls
- ViewEdit Blues
- More CTB Questions
- How many lasers in chooser?
- appe info wanted
- Setting SIZE Resource from MPW
- TMON typ# TMPL?
- MacApp 3.0 and Dialog Views
- Address error
-
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
-
- The digest is a collection of article threads from the internet newsgroup
- comp.sys.mac.programmer. It is designed for people who read c.s.m.p. semi-
- regularly and want an archive of the discussions. If you don't know what a
- newsgroup is, you probably don't have access to it. Ask your systems
- administrator(s) for details. (This means you can't post questions to the
- digest.)
-
- Each issue of the digest contains one or more sets of articles (called
- threads), with each set corresponding to a 'discussion' of a particular
- subject. The articles are not edited; all articles included in this digest
- are in their original posted form (as received by our news server at
- cs.uoregon.edu). Article threads are not added to the digest until the last
- article added to the thread is at least one month old (this is to ensure that
- the thread is dead before adding it to the digest). Article threads that
- consist of only one message are generally not included in the digest.
-
- The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
- [128.223.8.8] in the directory /pub/mac/csmp-digest. The most recent issues
- are available from sumex-aim.stanford.edu [36.44.0.6] in the directory
- /info-mac/digest/csmp. If you don't have ftp capability, the sumex archive
- has a mail server; send a message with the text '$MACarch help' (no quotes)
- to LISTSERV@ricevm1.rice.edu for more information.
-
- The digest is also available via email. Just send a note saying that you
- want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
- automatically receive each new issue as it is created. Sorry, back issues
- are not available through the mailing list.
-
- Send administrative mail to mkelly@cs.uoregon.edu.
-
-
- -------------------------------------------------------
-
- From: cfranz@iiic.ethz.ch (Christian Steffen Ove Franz)
- Subject: THINK Pascal and debugging Time Manager Calls
- Organization: Dept. Informatik, Swiss Federal Institute of Technology (ETH)
- Date: Thu, 11 Jun 1992 16:24:44 GMT
-
-
- I need some help in debugging a THINK Pascal program. I am using the TimeManager
- to schedule a process say 2 secs in the future. When the timer counts down, my
- routine gets called during interrupt.
-
- The first thing I do is to restore the A5 world (as mentioned in IM VI) to access
- the globals. No matter what I do, the program will bomb. Especially if I placed
- a breakpoint inside the procedure that gets executed during interrupt. Since I want
- my program to execute in the background every so often I must be relying on the
- time manager. Hence I need to debug the program. How can I do that? Is there
- something I overlooked in the manual (an arcane compiler option maybe?)
-
- Thanks for your help.
-
- Cheers,
- Christian
-
- - --
- - -----------------------------------------------------------------------------
- Christian S. O. Franz | cfranz@iiic.ethz.ch
- ETH Zuerich, Swizerland | vismgr@rz.ethz.ch
-
- +++++++++++++++++++++++++++
-
- From: siegel@world.std.com (Rich Siegel)
- Organization: GCC Technologies
- Date: Thu, 11 Jun 1992 20:02:41 GMT
-
- In article <1992Jun11.162444.9152@neptune.inf.ethz.ch> cfranz@iiic.ethz.ch (Christian Steffen Ove Franz) writes:
-
- >the globals. No matter what I do, the program will bomb. Especially if I placed
- >a breakpoint inside the procedure that gets executed during interrupt. Since I want
- >my program to execute in the background every so often I must be relying on the
-
- You can't use the THINK Pascal debugger to deubg interrupt level
- routines, and interrupt level routines written in Pascal will crash the
- system if you run them under the environment with debugging turned on.
- Place a {$Push} {$D-} in front of the procedure heading for any code
- to be executed at interrupt time, and {$Pop} after the end of the procedure.
-
- R.
-
-
-
- - --
- - -----------------------------------------------------------------------
- Rich Siegel Internet: siegel@world.std.com
- Software Engineer & Toolsmith
- GCC Technologies
-
- +++++++++++++++++++++++++++
-
- From: jpugh@apple.com (Jon Pugh)
- Date: 19 Jun 92 21:44:19 GMT
- Organization: Apple Co.
-
- In article <1992Jun11.162444.9152@neptune.inf.ethz.ch>, cfranz@iiic.ethz.ch (Christian Steffen Ove Franz) writes:
- >
- >
- > I need some help in debugging a THINK Pascal program. I am using the TimeManager
- > to schedule a process say 2 secs in the future. When the timer counts down, my
- > routine gets called during interrupt.
- >
- > The first thing I do is to restore the A5 world (as mentioned in IM VI) to access
- > the globals. No matter what I do, the program will bomb. Especially if I placed
- > a breakpoint inside the procedure that gets executed during interrupt. Since I want
- > my program to execute in the background every so often I must be relying on the
- > time manager. Hence I need to debug the program. How can I do that? Is there
- > something I overlooked in the manual (an arcane compiler option maybe?)
-
- You CANNOT use the debugger at interrupt time. Don't even try. In fact,
- you should turn off the debugging code for that routine like so:
-
- {$PUSH}
- {$D-}
- PROCEDURE Boogers;
- BEGIN
- END;
- {$POP}
-
- This will make sure you don't get any debugger code in there.
-
- As for debugging the sucker, use the tried and true method of making it so
- simple it canUt fail (see the code above for an example that CANNOT fail)
- and then adding stuff until it breaks. When it does, back up and try again.
- It ain't sophisticated, but it works.
-
- The trick (IMHO) to writing interrupt routines is to keep them SHORT and
- clean and to build them slowly. Be prepared to reboot often.
-
- Jon
-
- ---------------------------
-
- From: gray@tinman.asel.udel.edu (John Gray)
- Subject: ViewEdit Blues
- Organization: AI duPont Inst.
- Date: Tue, 16 Jun 1992 16:31:47 GMT
-
- ViewEdit can be a real pain. Does anyone know how to edit things you can't see.
- I realize I can get to views that are obstructed by other views but I can't
- figure out how to get to view with size 0,0. Or another case is a
- TextListView which is set to initailly have zero columns. The only thing
- I seem to be able to do is delete the superview and then create the super
- view and the view in question all over again ( along any other subviews the
- superview may have had. )
-
- Another thing that a find a little odd is that ViewEdit won't create certain
- things. For instance if you look at the DemoDialogs example app. Derez
- the Format Dialog, then try to create a similiar one with ViewEdit and Derez
- it. I can't make them match. There are fields that are different in the
- two that ViewEdit does not allow me to change (or View for that manner).
- When all the fields I do have control over are set to be the same, the two
- do not behave the same. One field in particular is a hex value at the
- end of the adorners list.
- Any suggestion would be appreciaged.
-
- Thanks
- John Gray
- gray@asel.udel.edu
-
- +++++++++++++++++++++++++++
-
- From: fgiraffe@well.sf.ca.us (Frank Giraffe)
- Organization: Whole Earth 'Lectronic Link
- Date: Wed, 17 Jun 1992 02:44:06 GMT
-
-
- John,
- Are you editing views for MacApp 2 or 3? There is a nice 3rd Party app
- called IcePick that edits MacApp 2 views (a upgrade for 3.0 views is
- promised "Real Soon"). It's available from MADA.
- - --
- >Frank Giraffe- fgiraffe@well.sf.ca.us - {apple,pacbell,ucbvax}!well!fgiraffe
- >As the noose of narco-militarism tightens 'round our necks, we worry about
- > burning flags and pee in jars at work to keep our jobs. -- Jello Biafra
-
- +++++++++++++++++++++++++++
-
- From: eyes@cs.ubc.ca (Eye Care Centre)
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Date: Sat, 20 Jun 92 04:05:27 GMT
-
- In article <1992Jun17.024406.27584@well.sf.ca.us> fgiraffe@well.sf.ca.us (Frank Giraffe) writes:
- >
- >Are you editing views for MacApp 2 or 3? There is a nice 3rd Party app
- >called IcePick that edits MacApp 2 views (a upgrade for 3.0 views is
- >promised "Real Soon"). It's available from MADA.
-
- A quick correction: IcePick has been sold by KPMG*ExIS to Apple to serve as
- a ViewEdit replacement for MacApp 3. MADA, which was distributing it, is/was
- examining possible legal actions against KPMG*ExIS for acting in bad faith
- (promising a 3.0-compatible version but not delivering). The sordid details
- (well, some) are in the latest issue of FrameWorks.
-
- The bottom line is: Don't buy IcePick. However, there is a program called AdLib
- by Nick Nallick which MADA is attempting to secure the distribution rights for.
- It is described as "a view resource editor on steroids".
-
- Bill Kiss
- Programmer/Lab flunkie
- Dept. of Ophthalmology, UBC
-
- Disclaimer: A miffed IcePick purchaser.
-
- ---------------------------
-
- From: sakelley@euclid.ucsd.edu (Scott Kelley)
- Subject: More CTB Questions
- Date: 16 Jun 92 19:07:06 GMT
-
- I'm trying to implement a simple Telnet client using the CTB. It needs
- to be implemented as an XObject that can be called from MacroMind
- Director. I posted to the net a few weeks ago, and everyone recommended
- that I look into the Communications Toolbox. So far it looks very good,
- and it looks like I'll be able to do a lot less work than I had
- originally thought I would have to do.
- The question I'm stuck on is this: Where do I get a MacTCP tool? As
- far as I can tell, Apple doesn't sell one. (Or, if they do, the person I
- just talked to at APDA didn't know it. They may have one listed in the
- catalog...?). Is this something I need to buy from a third party? If so,
- can anybody direct me to the companies that would sell it?
- I'm also a little bit puzzled-- the CTB says it knows about a "MacTCP
- Tool" when I ask it... I assume it's responding to the MacTCP tool that
- I have installed as part of MacX? And didn't I hear on the net that that
- tool is hardcoded to port 6000?
- Thanks for any help or suggestions...
-
- Scott
-
- - -------------------------------------------------
- Scott Kelley, sakelley@ucsd.edu, (619) 534-8560
- Multimedia Interactive Learning Laboratory (MILL)
- Department of Biology, UC San Diego
- - -------------------------------------------------
-
- +++++++++++++++++++++++++++
-
- From: major@bbn.com (John Major)
- Date: 17 Jun 92 17:18:20 GMT
- Organization: Bolt Beranek and Newman Inc., Cambridge MA
-
-
- To use Telnet with MacTCP and the Comm Toolbox, use one of the third
- party Connection Tools - Versaterm Telnet Tool from Synergy Software,
- or TCPak from Advanced Software Concepts (a French gang). They are
- both excellent. The MacTCP Tool that comes with MacX I know will only
- work with MacX, and now you've told me why - "hardwired for port 6000",
- eh?
-
- Good luck -
- John Major
- major@bbn.com
- ALINK:D6590
- 617/873-8165
-
- ps. Keep in mind that you will be talking to the Telnet tool through
- the CTB, so will not be able to do IP-specific programming. On the
- other hand, your XObject will be able to run over LAT, Serial, Modem,
- DecNet, ESP, whatever!
-
- +++++++++++++++++++++++++++
-
- From: raynaud@sun7c.lri.fr (Alain Raynaud)
- Date: 19 Jun 92 12:20:11 GMT
- Organization: LRI - Univ. Paris-Sud / CNRS URA 410
-
- In article <l3ususINNmbe@news.bbn.com>, major@bbn.com (John Major) writes:
- |>
- |> To use Telnet with MacTCP and the Comm Toolbox, use one of the third
- |> party Connection Tools - Versaterm Telnet Tool from Synergy Software,
- |> or TCPak from Advanced Software Concepts (a French gang). They are
- |> both excellent. The MacTCP Tool that comes with MacX I know will only
- |> work with MacX, and now you've told me why - "hardwired for port 6000",
- |> eh?
-
- Well, this is not perfectly correct : you can tell the MacTCP Tool of
- MacX to use another port. There is standard call of the Comm Toolbox that
- gets a string representing the configuration of the tool. Guess what : that
- string contains something like "RemoteTCPPort 6000". Just change that
- (by another standard call) and you will get connections with whatever
- port you want (I tried it with ftp, telnet and NNTP).
-
- The only problem is : I don't know of a Comm Program that let's you modify
- the configuration string of a tool.
-
- Alain Raynaud
-
- ---------------------------
-
- From: gregf@shaman.sps.mot.com (Greg Ferguson)
- Subject: How many lasers in chooser?
- Date: 16 Jun 92 18:46:38 GMT
- Organization: SPS
-
- Hi,
-
- Well, my DEVELOP CD is spinning away as On-Location tyies to find a reference
- to the buffer size allocated for printer names in the chooser.
-
- Seems to me that I read info about that just recently, but beats me where it
- was. Can anyone point me to the right info?
-
- I need: size of the buffer, or maxlength of the printer names and number of
- printers allowed.
-
- Thanks,
-
- Greg Ferguson
- rtmd30@email.sps.mot.com
- gregf@shaman.sps.mot.com
- - --
- ......POSTED VIA MOTOROLA SPS NEWS SERVER.......
-
- +++++++++++++++++++++++++++
-
- From: gregf@shaman.sps.mot.com (Greg Ferguson)
- Date: 19 Jun 92 19:45:25 GMT
- Organization: SPS
-
- Summary of responses to request for information on Chooser limitations
- and buffer sizes and number of devices available for display.
-
- Thanks for the responses,
-
- Greg Ferguson
- Motorola, Inc.
-
- =====[ attachments ]===============
-
- Date: Wed, 17 Jun 92 11:13:18 CDT
- From: "john cavallino" <uunet!midway.uchicago.edu!jcav>
- To: gregf@shaman.sps.mot.com
- Subject: Re: How many lasers in chooser?
- Newsgroups: comp.sys.mac.programmer
- In-Reply-To: <1992Jun16.184638.14912@newsgate.sps.mot.com>
- Organization: The Royal Society for Putting Things on Top of Other Things
- Cc:
-
- In article <1992Jun16.184638.14912@newsgate.sps.mot.com> you write:
- >Well, my DEVELOP CD is spinning away as On-Location tyies to find a reference
- >to the buffer size allocated for printer names in the chooser.
- >
- >Seems to me that I read info about that just recently, but beats me where it
- >was. Can anyone point me to the right info?
- >
- >I need: size of the buffer, or maxlength of the printer names and number of
- >printers allowed.
-
- I've appended two articles that go into exhaustive detail about Chooser
- limitations. The first one talks about the Chooser in System 6, the second
- discusses System 7. Hope this helps.
-
- JohnC
-
- - ------------------------------------------------------------------------------
- - -
- John Cavallino | EMail: jcav@midway.uchicago.edu
- University of Chicago Hospitals |
- John_Cavallino@uchfm.bsd.uchicago.edu
- Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
- B0 f++ c+ g+ k s++ e+ h- pv | Chicago, IL 60637
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Article 11085 of comp.sys.mac.system:
- Xref: midway comp.sys.novell:3568 comp.sys.mac.system:11085
- comp.protocols.appletalk:3449
- Path:
- midway!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!sample.eng.ohio-sta
- te.edu!purdue!bu.edu!olivea!apple!aux.support.apple.com!winders
- From: winders@aux.support.apple.com (Scott Winders)
- Newsgroups: comp.sys.novell,comp.sys.mac.system,comp.protocols.appletalk
- Subject: Re: Apple Chooser Limitation problem???
- Message-ID: <58720@apple.Apple.COM>
- Date: 17 Oct 91 17:11:05 GMT
- Sender: daemon@Apple.COM
- Distribution: usa
- Organization: Apple Computer, Inc.
- Lines: 118
-
- System 6.0.x Chooser Limitations
-
- The following information is true for Chooser versions 3.x:
-
- The Chooser DA window consists of 5 separate sections:
-
- 1. The device type list.
- 2. The AppleTalk zone list (only visible if there are multiple zones).
- 3. The user name box.
- 4. The AppleTalk active/inactive controls.
- 5. The available devices name list.
-
- 1. The Chooser is able to display a maximum of 16 items in the
- Chooser device type list. This is the limit that is imposed by the
- Chooser itself, not by something interfering with the operation of
- the Chooser.
-
- 2. The Chooser allocates memory for the zone list dynamically, up to
- 32K. Each entry in the zone list takes up 1 byte of memory for each
- character in the zone name plus 1 byte. The Chooser uses this extra
- byte as a length byte. For example, the 7 character zone name "My
- Zone" takes up 8 bytes of memory: 7 bytes for the characters and 1
- byte for the length byte. The maximum length of a zone name is 32
- characters. A 32 character zone name will take up 33 bytes of memory.
-
- Based on this information, if every zone had a 32 character name, it
- would be possible to have a maximum of 992 zones listed in the
- Chooser (32K / 33 = 992.97, remove the remainder). The maximum number
- of zones that may be displayed in the Chooser is wholly dependent on
- the length of the zone names being used.
-
- 3. The user name may be a maximum of 31 characters long.
-
- 4. This one is self explanatory; it controls whether or not AppleTalk
- is active.
-
- 5. Determining the maximum number of visible Chooser device names:
-
- System 5.x and 6.x Choosers allocate a 512 byte buffer for
- containing the Chooser's list of available AppleTalk network device
- names. Each name in the buffer is embedded in an AppleTalk Name
- Binding Protocol (NBP) packet received by the chooser from the
- selected device type. The NBP packet is called a lookup reply and is
- sent in answer to the Chooser's lookup broadcast for the selected
- device. An example is the selection of the device type LaserWriter
- driver and the displayed LaserWriter object names.
-
- It is due to the filling of the 512 byte buffer that sometimes
- causes various names in the Chooser selection window to appear and
- disappear. When selecting the LaserWriter driver in this situation, a
- LaserWriter will disappear and another appear approximately once each
- 1.5 seconds. This happens whenever there are more names than the
- buffer can hold. Because the lookups are usually sent in a series,
- whenever a device will not fit on the display list, the first reply
- received from a previous lookup is removed and replaced with the name
- of the device that did not fit. This process will continue for each
- following lookup broadcasted by the Chooser. While the display list
- is also limited to 32 names, this is never reached when displaying
- devices like LaserWriters because even with 1 character per name the
- buffer will be filled when 22 LaserWriters are displayed.
-
- If the constantly appearing and disappearing LaserWriter situation
- is encountered by a customer, the customer can either break their
- network up into zones containing smaller numbers of the particular
- device or reduce the lengths of some or all of the device names.
-
- The buffer space used by each returned AppleTalk device is the
- length of the NBP reply packet returned by the device to the
- Chooser's lookup.
-
- NBP LaserWriter LookUp Reply PACKET definition
- - ----------------------------------------------
- Function and Tuple Count: 1 byte
- NBP ID: 1 byte
- Network number: 2 bytes
- Node ID: 1 byte
- Socket Number: 1 byte
- Enumerator: 1 byte
- Object Field Length: 1 byte
- Object: length of name
- Type Field Length: 1 byte
- Type: 11 bytes for type "LaserWriter"
- Zone Field Length: 1 byte
- Zone: 1 byte for zone "*" the NBP reply default
- - ---------------------------------------------------------------------------
- TOTAL 22 bytes + length of the
- LaserWriter's name
-
- A calculation for determining the maximum number of visible
- LaserWriters in a zone:
-
- Number of visible LaserWriters = trunc(512/(22+(sum of name lengths
- / Number of LaserWriters))
-
- If the LaserWriter names are all the same length, the calculation is
- simplified to trunc(512/(22+length)). The mean calculation (sum of
- name lengths / Number of LaserWriters) is not necessary in this case.
-
- Note: Trunc indicates that decimal values should be ignored. i.e. A
- result of 12.8 indicates 12 LaserWriters.
-
- The calculation can be used for any other type of AppleTalk device
- if the type length is known and the mean of the device names.
-
- Current Chooser v3.3.1 selecting the Apple LaserWriter driver
- displays:
-
- Mean Name length Max number of visible LaserWriters
- 30 9
- 25 10
- 20 12
- 15 13
- 10 16
- 5 18
-
- Scott Winders
- internet: winders@aux.support.apple.com
- AppleLink: winders.s@applelink.apple.com
-
-
- Article 11087 of comp.sys.mac.system:
- Xref: midway comp.sys.novell:3569 comp.sys.mac.system:11087
- comp.protocols.appletalk:3450
- Path:
- midway!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!sample.eng.ohio-sta
- te.edu!purdue!news.cs.indiana.edu!spool.mu.edu!mips!apple!aux.support.apple.co
- m!winders
- From: winders@aux.support.apple.com (Scott Winders)
- Newsgroups: comp.sys.novell,comp.sys.mac.system,comp.protocols.appletalk
- Subject: Re: Apple Chooser Limitation problem???
- Message-ID: <58721@apple.Apple.COM>
- Date: 17 Oct 91 17:22:01 GMT
- Sender: daemon@Apple.COM
- Distribution: usa
- Organization: Apple Computer, Inc.
- Lines: 100
-
- The following information pertains to the System 7 Chooser (version 7.0):
-
- The Chooser DA window consists of four separate sections:
-
- 1) The device type list.
- 2) The AppleTalk zone list (visible only if there are multiple zones).
- 3) The AppleTalk active/inactive controls.
- 4) The available devices name list.
-
-
- 1) The Chooser is able to display a maximum of 32 items in the
- Chooser device type list (Note: The System 6 limit was 16). This is the
- limit that is imposed by the Chooser itself, not by something
- interfering with the operation of the Chooser.
-
- 2) The Chooser allocates memory for the zone list dynamically, up to
- 32K (Note: this is the same as the System 6 Chooser). Each entry in
- the zone list uses 1 byte of memory for each character in the zone name,
- plus 1 byte. The Chooser uses this extra byte as a length byte. For
- example, the 7-character zone name "My Zone" uses 8 bytes of memory: 7
- bytes for the characters and 1 byte for the length byte. The maximum
- length of a zone name is 32 characters. A 32-character zone name uses
- 33 bytes of memory.
-
- Based on this information, if every zone had a 32-character name, it
- would be possible to have a maximum of 992 zones listed in the Chooser
- (32,768 / 33 = 992.97, remove the remainder). The maximum number
- of zones that can be displayed in the Chooser is wholly dependent on
- the length of the zone names being used.
-
- 3) This one is self-explanatory; it controls whether or not AppleTalk
- is active (Note: this is the same as the System 6 Chooser).
-
- 4) Determining the maximum number of visible Chooser device names:
-
- The System 7 Chooser allocate a 32,768-byte buffer for the Chooser's
- list of available AppleTalk network device names (Note: the System 6
- Chooser allocated a 512-byte buffer). Each name in the buffer is
- embedded in an AppleTalk Name Binding Protocol (NBP) packet received
- by the Chooser from the selected device type. The NBP packet is called
- a "lookup reply", and is sent in answer to the Chooser's lookup broadcast
- for the selected device. An example is the selection of the device type
- LaserWriter driver, and the displayed LaserWriter object names.
-
- The buffer space used by each returned AppleTalk device is the length of
- the NBP reply packet returned by the device to the Chooser's lookup.
-
- NBP LaserWriter Lookup Reply Packet Definition
- ----------------------------------------------
- Function and Tuple Count: 1 byte
- NBP ID: 1 byte
- Network Number: 2 bytes
- Node ID: 1 byte
- Socket Number: 1 byte
- Enumerator: 1 byte
- Object Field Length: 1 byte
- Object: length of name
- Type Field Length: 1 byte
- Type: 11 bytes for type "LaserWriter"
- Zone Field Length: 1 byte
- Zone: 1 byte for zone "*" the NBP reply default
-
- - ----------------------------------------------------------------------
- TOTAL 22 bytes + length of the LaserWriter name
-
- A calculation for determining the maximum number of visible
- LaserWriters in a zone:
-
- Number of visible LaserWriters = trunc(32,768/(22+(sum of name lengths /
- Number of LaserWriters))
-
- If the LaserWriter names are all the same length, the calculation is
- simplified to trunc(32,768/(22+length)). The mean calculation
- (sum of name lengths / Number of LaserWriters) is not necessary in this
- case.
-
- (NOTE: Trunc indicates that decimal values should be ignored. That
- is, a result of 780.19 indicates 780 LaserWriters.)
-
- The calculation can be used for any other type of AppleTalk device, if
- the type length and the mean of the device names are known.
-
- System 7 Chooser selecting the Apple LaserWriter driver displays:
-
- Mean Name Length Max Number of Visible LaserWriters
- ---------------- ----------------------------------
- 32 606
- 30 630
- 25 697
- 20 780
- 15 885
- 10 1024
- 5 1213
-
- Copyright 1989 Apple Computer, Inc.
-
-
- Scott Winders
- internet: winders@aux.support.apple.com
- AppleLink: winders.s@applelink.apple.com
-
-
-
-
- ===========================================
-
- Date: Fri, 19 Jun 1992 11:46 EST
- From: "Anthony C. Canike" <uunet!ecl.psu.edu!ACC>
- Subject: How many lasers in chooser?
- To: gregf@shaman.sps.mot.com
- X-Vms-To: in%"gregf@shaman.sps.mot.com"
-
- Greg -
-
- Here's some info I got from DEVSUPPORT at Apple. Hope it helps.
-
- - -----------
-
- ...
-
- Now back to your original question, what's going on with my
- printer? As I mentioned previously, I suspect your network
- might be a prime contributor to your problems. However, if the
- network is not at fault I have a few Ideas that I will layout in
- just a second. To begin with, the IIg printers have proven to be
- very reliable over the network. Additionally Apple has not had
- reports of networking issues or problems as you describe. One
- possibility is that The Chooser is only able to display up to a
- maximum of 16 items in the Chooser device list. This is the limit
- imposed by the Chooser itself, not by something interfering
- with the operation of the Chooser.
-
- How many devices are in your zone? Is it possible your exceeding
- physical limits? Further, the Chooser allocates memory for
- the zone list dynamically, up to 32K. Each entry in the zone list
- uses 1 byte of memory for each character in the zone name, plus 1
- byte. The Chooser uses this extra byte as a length byte. For
- example, the 7-character zone name "My Zone" uses 8 bytes of
- memory: 7 bytes for the characters and 1 byte for the length
- byte. The maximum length of a zone name is 32 characters. A
- 32-character zone name uses 33 bytes of memory. Based on this
- information, if every zone had a 32-character name, it would be
- possible to have a maximum of 992 zones listed in the Chooser
- (32K / 33 = 992.97, remove the remainder). The maximum number of
- zones that can be displayed in the Chooser is wholly dependent
- on the length of the zone names being used. System 5.x and 6.x
- Choosers allocate a 512-byte buffer for the Chooser's list of
- available AppleTalk network device names. Each name in the
- buffer is embedded in an AppleTalk Name Binding Protocol (NBP)
- packet received by the Chooser from the selected device type.
- The NBP packet is called a "lookup reply", and is sent in answer
- to the Chooser's lookup broadcast for the selected device. An
- example is the selection of the device type LaserWriter
- driver, and the displayed LaserWriter object names. When the
- 512-byte buffer is filled, this sometimes causes various
- names in the Chooser selection window to appear and disappear.
- When selecting the LaserWriter driver in this situation, a
- LaserWriter disappears and another appears approximately
- once each 1.5 seconds. This happens whenever there are more
- names than the buffer can hold. Because the lookups are usually
- sent in a series, whenever a device does not fit on the display
- list, the first reply received from a previous lookup is
- removed and replaced with the name of the device that did not
- fit. This process continues for each following lookup
- broadcasted by the Chooser. While the display list is also
- limited to 32 names, this is never reached when displaying
- devices like LaserWriters, because even with 1 character per
- name, the buffer is filled when 22 LaserWriters are displayed.
-
- *If you encounter the constantly appearing and disappearing LaserWriter
- situation, you can either break the network up into zones containing
- smaller numbers of the particular device, or reduce the length of some or
- all of the device names.*
-
- The buffer space used by each returned AppleTalk device is the length
- of the NBP reply packet returned by the device to the Chooser's lookup.
-
- NBP LaserWriter Lookup Reply Packet Definition
- ----------------------------------------------
- Function and Tuple Count: 1 byte
- NBP ID: 1 byte
- Network Number: 2 bytes
- Node ID: 1 byte
- Socket Number: 1 byte
- Enumerator: 1 byte
- Object Field Length: 1 byte
- Object: length of name
- Type Field Length: 1 byte
- Type: 11 bytes for type "LaserWriter"
- Zone Field Length: 1 byte
- Zone: 1 byte for zone "*" the NBP reply default
- ----------------------------------------------------------------------
- TOTAL 22 bytes + length of the LaserWriter name
-
- A calculation for determining the maximum number of visible LaserWriters
- in a zone:
-
-
- Number of visible LaserWriters = trunc(512/(22+(sum of name lengths /
- Number of LaserWriters))
-
-
- If the LaserWriter names are all the same length, the calculation is
- simplified to trunc(512/(22+length)). The mean calculation (sum of name
- lengths / Number of LaserWriters) is not necessary in this case.
-
- (NOTE: Trunc indicates that decimal values should be ignored. That is, a
- result of 12.8 indicates 12 LaserWriters.)
-
- The calculation can be used for any other type of AppleTalk device, if
- the type length and the mean of the device names are known.
-
- Chooser, selecting the Apple LaserWriter driver displays:
-
- Mean Name Length Max Number of Visible LaserWriters
- ---------------- ----------------------------------
- 30 9
- 25 10
- 20 12
- 15 13
- 10 16
- 5 18
-
- I hope this information address your question. At this point you need to
- determine a few things:
-
- ....
-
- ******************************************************************************
-
-
-
- - ------------
-
- +-----------------------------------------------------------------------------
- +
- + Tony Canike KA3ZPH acc@ecl.psu.edu
- +
- + 814-237-0309x255 (day)
- +
- +-----------------------------------------------------------------------------
- +
-
- - --
- ......POSTED VIA MOTOROLA SPS NEWS SERVER.......
-
- ---------------------------
-
- From: zobkiw@world.std.com (Joe Zobkiw)
- Subject: appe info wanted
- Date: 19 Jun 92 12:24:36 GMT
- Organization: The World Public Access UNIX, Brookline, MA
-
- I'm about to embark on a little tangent, writing a faceless background
- application. My first idea was to write an appe and communicate with it
- via AE from a "Configuration application" of some type.
-
- So, I look on the dev cd's and I find two examples of daemon applications
- but they are all of type APPL with the onlyBackground flag set.
-
- I there any information available on writing an appe instead? What are
- the differences? Why would I want one instead of the other? please feel
- free to refer me to any documents to read, IM VI seems to say very little
- about this. Maybe I just missed it?
-
- Thanks in advance and my apologies if this has been discussed.
-
-
- - --
- - -- joe zobkiw Internet: zobkiw@world.std.com
- - -- AOL: AFL Zobkiw
- - -- mac.synthesis.MIDI.THINK C.OOP
- - -- asm.comm.networks.cool tunes...
-
- +++++++++++++++++++++++++++
-
- From: grobbins@Apple.COM (Grobbins)
- Date: 19 Jun 92 17:10:35 GMT
- Organization: Apple DTS
-
- In article <Bq3EH1.53K@world.std.com> zobkiw@world.std.com (Joe Zobkiw) writes:
- >I there any information available on writing an appe instead? What are
- >the differences? Why would I want one instead of the other?
-
- 'appe' is an application extension. If your faceless background
- application is given the type appe instead of APPL, it will be routed
- to the Extensions folder if the user drags it onto the System folder,
- and it will be launched at startup time.
-
- So, to the user, an 'appe' looks just like an INIT. From a developer's
- point of view, it's quite a bit easier to write and debug, since it is
- a normal (albeit somewhat restricted) application.
-
- For more information see the article "Be Our Guest" in issue 9 of develop.
-
- Grobbins grobbins@apple.com
-
- Usual disclaimers apply.
-
- +++++++++++++++++++++++++++
-
- From: zobkiw@world.std.com (Joe Zobkiw)
- Date: 20 Jun 92 00:18:32 GMT
- Organization: The World Public Access UNIX, Brookline, MA
-
- >> For more information see the article "Be Our Guest" in issue 9 of develop.
-
- Yea but...issue 9 talks only about APPLs with the onlyBackground bit set.
- I mentioned that in my previous post, I think. I need some information
- on appe type things. Thanks.
-
-
- - --
- - -- joe zobkiw Internet: zobkiw@world.std.com
- - -- AOL: AFL Zobkiw
- - -- mac.synthesis.MIDI.THINK C.OOP
- - -- asm.comm.networks.cool tunes...
-
- ---------------------------
-
- From: wjb@cscsun2.larc.nasa.gov (William J. Bene)
- Subject: Setting SIZE Resource from MPW
- Organization: NASA Langley Research Center, Hampton, VA USA
- Date: Fri, 19 Jun 1992 16:25:45 GMT
-
- How do you set the size resource for the suggested memory size for an
- application in MPW? I thought there might be an option on the Link or Rez
- tools but I haven't found one.
-
- ==============================
- William J. Bene
- Computer Sciences Corp.
- wjb@cscsun2.larc.nasa.gov
-
-
-
- +++++++++++++++++++++++++++
-
- From: peirce@outpost.SF-Bay.org (Michael Peirce)
- Date: 20 Jun 92 17:19:16 GMT
- Organization: Peirce Software
-
-
- In article <1992Jun19.162545.9701@news.larc.nasa.gov> (comp.sys.mac.programmer), wjb@cscsun2.larc.nasa.gov (William J. Bene) writes:
- > How do you set the size resource for the suggested memory size for an
- > application in MPW? I thought there might be an option on the Link or Rez
- > tools but I haven't found one.
-
- You use Rez and feed it a resource file definition (a .r file). In
- that Rez file you declare a SIZE resource something like this:
-
- resource 'SIZE' (-1) {
- saveScreen,
- acceptSuspendResumeEvents,
- enableOptionSwitch,
- canBackground,
- doesActivateOnFGSwitch,
- backgroundAndForeground,
- dontGetFrontClicks,
- ignoreAppDiedEvents,
- is32BitCompatible,
- isHighLevelEventAware,
- localAndRemoteHLEvents,
- notStationeryAware,
- reserved,
- reserved,
- reserved,
- reserved,
- 575 * 1024,
- 2550 * 1024,
- };
-
- - -- Michael Peirce -- peirce@outpost.SF-Bay.org
- - -- Peirce Software -- Suite 301, 719 Hibiscus Place
- - -- Makers of... -- San Jose, California USA 95117
- - -- -- voice: (408) 244-6554 fax: (408) 244-6882
- - -- SMOOTHIE -- AppleLink: peirce & America Online: AFC Peirce
-
- ---------------------------
-
- From: stevep@wrq.com (Steve Poole)
- Subject: TMON typ# TMPL?
- Date: 19 Jun 92 18:12:59 GMT
- Organization: Walker Richer & Quinn
-
- Anyone know where I can find a TMPL resource for creating and
- editing TMON typ# resources? I'm kind of surprised to not find
- one on the distribution disks. Thanks.
-
- - --------------------------------------------------------------------------
- - - Internet: stevep@wrq.com - AOL: Spoole - INTEL 80x86: Just say NOP -
- - - "Nurse! Do let's pretend that I'm a hungry hyaena, and you're a bone!" -
- - --------------------------------------------------------------------------
-
- +++++++++++++++++++++++++++
-
- From: neal@farallon.com (Neal Trautman)
- Date: 20 Jun 92 15:29:19 GMT
- Organization: Farallon Computing, Inc.
-
- In article <1992Jun19.181259.27085@u.washington.edu>, stevep@wrq.com (Steve Poole) writes:
- >
- > Anyone know where I can find a TMPL resource for creating and
- > editing TMON typ# resources? I'm kind of surprised to not find
- > one on the distribution disks. Thanks.
- >
-
- If you really mean TMON Pro's 'Typ#' resource, the template
- is in the TMON application. Simply open the TMON application
- in ResEdit and then you can use any of the 14 TMPL's that
- are in the application.
-
- If you still can't find it, here it is:
-
- 084E756D54797065734F434E54052A2A2A2A2A4C53544305466C616773484C4E470453697A65484C4E47024944484C4E47044E616D6545535452094E756D4669656C64734F434E54052D2D2D2D2D4C53544305466C61677348575244064F6666736574484C4E470453697A65484C4E470754797065204944484C4E47044E616D6545535452052D2D2D2D2D4C535445052A2A2A2A2A4C535445
-
- It's in hex, simply copy the hex data, create a new Typ# TMPL resource
- in ResEdit, open it using the Hex Editor and paste in the hex data.
- If you close the resource and reopen it you should have a normal
- TMPL resource that should work.
- - --
- Neal Trautman
- Timbuktu Lead Software Engineer
- Farallon Computing, Inc.
- neal@farallon.com
-
-
- ---------------------------
-
- From: karl@sparcom.com (Karl J. Smith)
- Subject: MacApp 3.0 and Dialog Views
- Date: 19 Jun 92 06:20:16 GMT
- Organization: Sparcom Corp., Corvallis/Tigard, Oregon
-
- ViewEdit 3.0b2 is driving me crazy. I'm trying to create a dialog box
- with an 'OK' a 'Cancel' and some static text. I'm using the following
- snippet of code to display it:
-
- pascal void TApplicationMine::MakeTheDialog(CommandNumber aCommandNumber)
- {
- TWindow * aWindow;
- IDType dismisser;
-
- FailNIL(aWindow = gViewServer->NewTemplateWindow((short)aCommandNumber, NULL));
- dismisser = aWindow->PoseModally();
- if (dismisser == 'ok ') {
- do_something();
- }
- aWindow->Close();
- } // TApplicationMeld::MakeConnectionInstallDialog
-
- What happens is that the dialog is displayed on the screen, but clicking
- the buttons produce no result. I'm stuck there forever.
-
- The buttons are 'ok ' and 'cncl' and are mentiond
- as 'default item view' and 'cancel item view' in the TDialogView fields.
-
- I've used ViewEdit to compare my views to the ModalBeepDialog in DemoDialogs,
- and it's the same as far as I can tell, except for the item positions.
- Why do the DemoDialogs views work, and not mine?
-
- - -Karl Smith
- karl@sparcom.com
-
- +++++++++++++++++++++++++++
-
- From: sdk@cci632.cci.com (Stephen Knight)
- Date: 20 Jun 92 16:14:53 GMT
- Organization: [Computer Consoles, Inc., Rochester, NY
-
- In article <548@sparcom.sparcom.com> karl@sparcom.com (Karl J. Smith) writes:
- >ViewEdit 3.0b2 is driving me crazy. I'm trying to create a dialog box
- >with an 'OK' a 'Cancel' and some static text. I'm using the following
- >snippet of code to display it:
- >
- >pascal void TApplicationMine::MakeTheDialog(CommandNumber aCommandNumber)
- >{
- > TWindow * aWindow;
- > IDType dismisser;
- >
- >FailNIL(aWindow = gViewServer->NewTemplateWindow((short)aCommandNumber, NULL));
- >dismisser = aWindow->PoseModally();
- >if (dismisser == 'ok ') {
- > do_something();
- >}
- >aWindow->Close();
- >} // TApplicationMeld::MakeConnectionInstallDialog
- >
- >What happens is that the dialog is displayed on the screen, but clicking
- >the buttons produce no result. I'm stuck there forever.
- >
- >The buttons are 'ok ' and 'cncl' and are mentiond
- >as 'default item view' and 'cancel item view' in the TDialogView fields.
- >
- >I've used ViewEdit to compare my views to the ModalBeepDialog in DemoDialogs,
- >and it's the same as far as I can tell, except for the item positions.
- >Why do the DemoDialogs views work, and not mine?
- >
-
- Using ViewEdit, check your 'ok ' and 'cncl' buttons. In the TControl
- part of the button the "Default Choice" needs to be set to 34 (mDismiss) for
- PoseModally to know that it should close the dialog view and return
- the control id. In "Programmers Guide to MacApp", chapter 12, they don't
- mention this little detail for PoseModally (they might in the 411 doc, but
- I don't have it accessible right now).
- ViewEdit, on a button creation, sets the default choice to 3, which is
- mButtonHit, assuming that your own DoEvent would be handling it.
-
- If you have a look in DemoDialogs.r, you'll find some lines similar to:
-
- "Button {34, notHilited, notDimmed, sizeable, {4, 4, 4, 4}, 700,
- dontPreferOutline, kButtonLabels, 2}, "
-
- That "34" is the control object event number, which is how PoseModally
- works for DemoDialogs.
-
- Course, you've probably received 20 different messages like mine...after
- you hunted down the offending section of code in MacApp. Oh well, I tried.
-
- steve knight
- sdk@ccird2.cci.com
-
- ---------------------------
-
- From: johns@uuisis.isis.org (john smith)
- Subject: Address error
- Organization: International Shared Information Service (Ottawa)
- Date: Sat, 20 Jun 92 15:17:36 GMT
-
- I'm trying to write a code to put a single window with 5 dialog items
- (byte mag, april 1992). I copied the code direct from the mag, modified it
- to get rid of the void().. It runs but I get an Address Error. I'm using
- think 5.0.. What do i have to look for to corrct this problem.. Can anyone
- write me a little code to put a window on my mac.. I'm very good with
- resedit but i'm a junior amateur programmer in C.. Can I go out with your
- sister? Can I borrow your car??
- But seriously, any help would be greatly appreciated... Here's the code away
-
-
-
- #include <Types.h>
- #include <QuickDraw.h>
- #include <Windows.h>
- #include <Dialogs.h>
-
- #define DIAGNOSTIC_DIALOG 400
- #define NIL 0L
- #define IN_FRONT -1
-
-
- Report_It()
- {
- long var1,var2,var3,var4;
-
- int item1Str[10], item2Str[10], item3Str[10], item4Str[10];
- short item;
- GrafPtr oldPort;
- DialogPtr timeDialog;
-
-
- NumToString(var1, item1Str);
- NumToString(var2, item2Str);
- NumToString(var3, item3Str);
- NumToString(var4, item4Str);
- ParamText(item1Str, item2Str, item3Str, item4Str);
- timeDialog = GetNewDialog(DIAGNOSTIC_DIALOG,NIL,(WindowPtr)IN
- _FRONT);
- GetPort(&oldPort);
- SetPort(timeDialog);
- ModalDialog(NIL, &item);
- SetPort(oldPort);
- DisposDialog(timeDialog);
-
-
-
- }
- /*end Report_It*/
-
-
- main()
- {
-
-
- Report_It();
-
- }
-
-
-
-
-
-
-
-
- Thanks in advance...JOHNS.uuisis
-
-
- +++++++++++++++++++++++++++
-
- Organization: University of Illinois at Chicago
- Date: Saturday, 20 Jun 1992 21:31:27 CDT
- From: <U11852@uicvm.uic.edu>
-
- Do the "GetPort" call before you do the GetNewDialog call. That alone,
- can cause problems, cause I think I've seen somewhere that GetNewDialog
- DOES a SetPort. That way, after the call to DisposeDialog, you would not
- re-set the port to garbage as in this case, since the dialog has been
- disposed of.
- Hope it helps.
- ***** G.V.Rasani
- Breaking up with somebody, should appear on your resume...
- *****
-
- ---------------------------
-
- End of C.S.M.P. Digest
- **********************
-